<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<html>
<head>
<title>쇼핑몰</title>

</head>
<body>
<s:form action="orderStart" name="basketform" method="post">
<table width="960" cellspacing="0" cellpadding="0" border="0"
	align="center">
	<tr>
		<td colspan=2>
		<p align="center">
			<table width="80%">
				<tr align="center">
					<td><b>장 바 구 니</b></td>
				</tr>
			</table>
		
		<c:if test="${count == 0}">
			<table width="80%" cellpadding="0" cellspacing="0">
				<tr>
					<td colspan="7" align="center"><font size="2">장바구니에 담긴
					상품이 없습니다.</font></td>
				</tr>
			</table>
		</c:if> 
		
		<c:if test="${count > 0}">
			
				<table width="80%" cellpadding="0" cellspacing="0">
					<tr height=26 bgcolor="94d7e7">
						<td height="3" colspan="7" align=right></td>
					</tr>
					<tr bgcolor="#f0f8ff" align="center">

						<td width="5%"><font size="2">번호</font></td>
						<td width="5%"><font size="2">사진</font></td>
						<td width="25%"><font size="2">제품명</font></td>
						<td width="8%"><font size="2">수량</font></td>
						<td width="8%"><font size="2">가격</font></td>
						<td width="8%"><font size="2">취소</font></td>
					</tr>

					<s:iterator value="list" status="stat">
						
					<tr align="center">
						<td><font size="2"><s:property
							value="%{list.get(#stat.index).BASKET_PRODUCT_NUM}" /></font></td>
						<td><font size="2"><img src="./image/<s:property value="%{list.get(#stat.index).BOARD_FILE}"/>.split(",")[0]" width=50 height=50></font></td>
						<td><font size="2"><s:property
							value="%{list.get(#stat.index).CATE_TYPE}" /></font></td>
						<td><font size="2"><s:property
							value="%{list.get(#stat.index).AMOUNT}" /></font></td>
						<td><font size="2"><s:property
							value="%{list.get(#stat.index).PRICE}" /></font></td>
						<td><a href="basketdel.action?BASKET_PRODUCT_NUM=<s:property value="%{list.get(#stat.index).BASKET_PRODUCT_NUM}"/>&ad=<s:property value="%{list.get(#stat.index).SHOP_ID}"/>"
								onclick=return confirm('취소하시겠습니까?');>취소</a></td>
					</tr>
					</s:iterator>
					
				</table>
				
				<input type="hidden" name="s_name" value="<s:property value="%{list.get(0).SHOP_ID}"/>"/>

				<table width="80%" border="0" cellspacing="0" cellpadding="0">
					<tr>
						<td height="2" bgcolor="94d7e7"></td>
					</tr>
				</table>
				<br>
				</c:if> 
				<table width="80%" cellpadding="0" cellspacing="0">
					<tr>
						<td align="center"><a href="javascript:basketform.submit()">
						[구매하기] </a> 
						 
						
						
						<c:if test="${count == 0}">
							<a href="#" onclick=javascript: alert('주문할 상품이 없습니다.');>
							[구매하기] </a>
						</c:if></td>
					</tr>
				</table>
				
		</td>
	</tr>
</table>
</s:form>
</body>

</html>